package lgs.hm.homework.work4;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ImportResource;
/*用xml的方式注入一下的依赖
总经理
	- name
	- age
	- sex
	- MiShu
		- name
		- age
		- sex
		- ZhangFu
	- SiJi
		- name
		- age
		- sex
		- Furen

要求总经理和秘书和司机都用xml注入，但是他们不再同一个xml*/
@ImportResource(locations= {"classpath:manager.cfg.xml","classpath:driver.cfg.xml","classpath:secretary.cfg.xml"})
public class CompanyXml {
	
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(CompanyXml.class);
		Manager bean = context.getBean(Manager.class);
		System.out.println(bean);
	}

}
